VARIABLES
v volume register
p player position on screen memory
j points
r record
b random position of new gem
l space character code
t offest to access corresponding color ram location
x number of lives
g() character for gems indexed by color code value -2
q gem type
n next extra 100 points factor
g flag for valid IJKL key-pressed
w counter for subsequent gems of the same type in a row
b random position for next gem
d new gem type
f old gem type
e vertical vs horizontal movement
c -1 for left/up movement,  +1 for right/down movement 


EXTENDED CODE (using CBM Prg Studio notation for special characters)
0l=32:v=36878:fork=.to4:readb$:fori=1to8:poke7167+i+k*8,asc(mid$(b$,i)):poke7421+i,.:next:next
1poke52,26:poke56,26:n=1:t=30720:pokev-9,255:pokev+1,8:print"{clear}{reverse on}{yellow}ijkl":x=3:p=7955:ifj>rthenr=j
2wait198,1:g(0)=211:g(1)=209:g(2)=215:g(3)=218:poke650,128:u=22:k=7745:y=7732:z=y-8
3geta$:b=z+rnd(.)*464:q=rnd(1)*4:pokeb,g(q):pokeb+t,q+2:ifj>=100*nthenx=x-(x<9):n=n+1
4pokek+i,l:pokey+i*u,l:i=i+1:ifi<=uthenpokek+i,4:pokek+i+t,6:pokey+i*u,4:pokey+i*u+t,7:m=peek(p)
5g=.:x=x+(m=4):e=sand1:c=s-1+e:ifi>utheni=.:y=z+rnd(.)*u-1:k=z+u*int((p-z)/u)-1
6ifc=sgn(c)theng=1:h=s+1:pokep,l:p=p+c*21*e+c:d=peek(p):ifd=fthenw=w-(d>l):j=j-(w>1)*w
7pokep+t,7:print"{home}{reverse on}{red}g{green}e{cyan}m{purple}s{white}"j" {blue}hi{cyan}"r" {yellow}{reverse off}b{green}{reverse on}"x:ifd>lthenifgthenpokev,9:pokev,.:data"{24}{60}{24}{102}{153}{24}{36}{102}"
8pokep,h:w=-w*(d=f):s=asc(a$+"@")-74:data"{24}{44}{152}{110}{25}{24}{40}{40}","{24}{36}{24}{102}{153}{24}{36}{102}","{24}{52}{25}{118}{152}{24}{40}{40}","{ 24}{ 36}{ 90}{189}{189}{ 90}{ 36}{ 24}"
9f=d:on-(x>.andp<8186andp>=z)goto3:printspc(7)"{reverse on}{red}game over":fora=.tov/9:next:poke198,0:j=.:goto1


COMMENTED, EXTENDED AND INDENTED CODE
0 
// Initiazation
l=32:v=36878:

// Read graphics data from strings
fork=.to4:readb$:fori=1to8:poke7167+i+k*8,asc(mid$(b$,i)):poke7421+i,.:next:next

1 --- GAME RESTART
// Move BASIC and code and variable top address
poke52,26:poke56,26:

// Initialization
n=1:t=30720:

// Set character data so that the first 64 chars are in ram and the last 128 are mapped as reversed
pokev-9,255:

// Set border and background to black color
pokev+1,8:

// Print instructions
print"{clear}{reverse on}{yellow}ijkl":

// Initialization
x=3:p=7955:

// Set record if new one
ifj>rthenr=j


2
// Wait for key press
wait198,1:

// Initialization of the gems shapes and colors (given by the index+2)
g(0)=211:g(1)=209:g(2)=215:g(3)=218:

// Set keyboard auto-repeat 
poke650,128:

// Initialization
u=22:k=7745:y=7732:z=y-8

3 --- MAIN GAME LOOP
    // Read keyboard
    geta$:

    // Compute random position
    b=b+rnd(1)*464:

    // Compute random gem type
    q=rnd(.)*4:

    // Display gem with corresponding color
    pokeb,g(q):pokeb+t,q+2:

    // Extra life if next 100 points are reached
    ifj>=100*nthenx=x-(x<9):n=n+1


    4
    // Delete the two enemies
    pokek+i,l:pokey+i*u,l:

    // Move the two enemies if limit is not reached
    i=i+1:ifi<=uthenpokek+i,4:pokek+i+t,6:pokey+i*u,4:pokey+i*u+t,7:

    // Character at player's position
    m=peek(p)


    5

    g=.:x=x+(m=4):

    // Part of IJKL trick (see [*]) to compute player's offset from ASCII code of pressed key 
    e=sand1:c=s-1+e:

    // If enemy reach limit, then compute new positions (random for vertical enemy, same as player for horizontal one)
    ifi>uthen
        i=.:y=z+rnd(.)*u-1:k=z+u*int((p-7724)/u)-1

    6

    // Part of IJKL trick (see [*]): If key pressed is I, J, K or L then delete player and compute new player's position
    ifc=sgn(c)then
        g=1:h=s+1:pokep,l:p=p+c*21*e+c:

    // If player's position is on the same gem as the previous one then compute new score and count number of gems in a row
    d=peek(p):
    ifd=fthen
        w=w-(d>l):j=j-(w>1)*w

    7
    // Set player's color at new position
    pokep+t,7:

    // Display score
    print"{home}{reverse on}{red}g{green}e{cyan}m{purple}s{white}"j" {blue}hi{cyan}"r" {yellow}{reverse off}b{green}{reverse on}"x:

    // If player has just moved and on a gem, then produce beep
    ifd>lthenifgthen
        pokev,9:pokev,.:
        // Some graphics data
        data"{24}{60}{24}{102}{153}{24}{36}{102}"


    8
    // Display player's
    pokep,h:

    // If gem not the same as the previous one, then reset the count of gems
    w=-w*(d=f):


    // Read ASCII code of pressed key 
    s=asc(a$+"@")-74:
    // Rest of graphics data
    data"{24}{44}{152}{110}{25}{24}{40}{40}","{24}{36}{24}{102}{153}{24}{36}{102}","{24}{52}{25}{118}{152}{24}{40}{40}","{ 24}{ 36}{ 90}{189}{189}{ 90}{ 36}{ 24}"


    9

    // Set previous gem type to the current one (to be used on the next loop)
    f=d:

// if still alive and not on border restart main game loop
on-(x>.andp<8186andp>z)
    goto3:

// else display game over, short pause, wait for key press, reset score to 0 and restart game
printspc(7)"{reverse on}{red}game over":fora=.tov/9:next:poke198,0:j=.:goto1


[TRICK] [*]
I have come up with this trick (by myself) in 2019. It may be a new trick.
I do not use conditionals, nor precomputed offsets, nor Boolean expressions.
I use an interpolating formula that computes the offset from the ASCII code of the pressed key.

I exploit the special symmetry of the ASCII codes of the keys I J K L:
- I and K have odd codes and a distance of 2 bytes
- J and L have even codes and a distance of 2 bytes
- I and K have odd ASCII codes
- J and L have even ASCII codes
So, given s=ASC(a$) with a$ either I or J or K or L, we update the position p with
p=p+c*(21*e+1) 
where
- e=s and 1 -> parity of the code, i.e., vertical vs horizontal movement
- c=s-75+e -> -1 for left/up vs +1 for right/down
- 21*e+1 -> vertical vs horizontal offset absolute value, i.e., 1 vs 22 